package com.globalwave.common.service;


import com.globalwave.base.BaseServiceImpl;
import com.globalwave.common.ArrayOrderList;
import com.globalwave.common.ArrayPageList;
import com.globalwave.common.entity.EventLog;
import com.globalwave.common.entity.EventLogCriterion;

public class EventLogServiceImpl 
       extends BaseServiceImpl 
       implements EventLogService {

    public EventLog create(EventLog eventLog) throws Exception {
    	
    	final EventLog result = (EventLog) jdbcDao.insert(eventLog, true);
    	
    	return result ;
    }


    public ArrayPageList<EventLog> query(
    		EventLogCriterion eventLogCriterion, 
            int pageIndex, 
            int pageSize, 
            ArrayOrderList orderList) throws Exception {
        
        if (orderList == null) {
            orderList = new ArrayOrderList() ;
            orderList.addDesc("event_log_id") ;
        }
        
        return (ArrayPageList<EventLog>) jdbcDao.query(eventLogCriterion, pageIndex, pageSize, orderList, EventLog.class);
    }



}
